<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <%- include ../taglibs/layout_head.ejs%>
    <%- include ../taglibs/layout.css.ejs%>
    <link rel="stylesheet" type="text/css" href="css/home/home.css">
    <link href="js/plugins/zTree/css/metroStyle/metroStyle.css" rel="stylesheet">
    <style type="text/css">
        .search-form{
        }
        .search-form .form-control{
            width: 80px;
        }
        .search-form label{
            font-size: 14px;
            font-family: "微软雅黑";
        }
        .search-form-box .form-group{
            margin-bottom: 4px;
        }
        .search-form-box .form-control{
            width: 200px;
        }
        .flot-chart {
            display: block;
            height: 200px;
        }
        .flot-chart-content {
            width: 100%;
            height: 100%;
        }
    </style>
    <script type="text/javascript">
        String.prototype.replaceAll = function (reallyDo, replaceWith) {
            return this.replace(new RegExp(reallyDo, ("gm")), replaceWith);
        };

        var parentMenuList = '<%= parentMenuList%>';
        var  sysMap = '<%= sysMap%>';
        var _parentMenuList,
            _sysMap;
        if(parentMenuList !="false"){
            if(parentMenuList.indexOf("&quot;") != -1){
                _parentMenuList = parentMenuList.replaceAll("&quot;", "\"");
            }else if(parentMenuList.indexOf("&#34;") != -1){
                _parentMenuList = parentMenuList.replaceAll("&#34;", "\"");
            }
            window.sessionStorage.setItem("rootMenus",_parentMenuList);
        }
        if(sysMap !="false"){
            if(sysMap.indexOf("&quot;") != -1){
                _sysMap = sysMap.replaceAll("&quot;", "\"");
            }else if(sysMap.indexOf("&#34;") != -1){
                _sysMap = sysMap.replaceAll("&#34;", "\"");
            }
            window.sessionStorage.setItem("chidlMenus",_sysMap)
        }
        var roleName = '<%=roleName%>';
        var roleId = '<%=roleId%>'
        if(roleName){
            window.sessionStorage.setItem("sysRoleName",roleName)
        }
        if(roleId){
            window.sessionStorage.setItem("sysRoleId",roleId)
        }
    </script>
</head>
<body>
<%-include("../taglibs/header.ejs",{params:{className:"active",homeIsActive:"true"}})%>
<div class="nav-body" id="divContent">
    <div class="home-box">
        <div class="row">
            <div class="col-sm-12">
                <div class="col-sm-4 box-content">
                    <div class="box box-first" id="box-first">
                        <div class="img-box">
                            <img src="images/page1/u20.png">
                        </div>
                        <div class="box-text">
                            <span style="display: block">
                                <span class="watchCarTotalNum" >0</span>辆
                             </span>
                            <span>
                                重点监控
                            </span>
                        </div>
                    </div>
                </div>
                <div class="col-sm-4 box-content ">
                    <div class="box box-second box-second-unline" >
                        <div class="img-box">
                            <img src="images/page1/闪电_u25.png">
                        </div>
                        <div class="box-text">
                             <span style="display: block">
                                <span class="upCar" >0</span>辆
                             </span>
                            <span>
                                <span id="unlineData">3</span>天以上离线(有线)
                            </span>
                        </div>
                    </div>
                </div>
                <div class="col-sm-4 box-content ">
                    <div class="box box-three" id="box-second-unTimeline">
                        <div class="img-box">
                            <img src="images/page1/书本_u29.png">
                        </div>
                        <div class="box-text">
                            <span style="display: block">
                                <span class="deviceUnLine">0</span>辆
                             </span>
                        <span>
                            <span id="unlineDeviceData">3</span>天以上设备未按时上线(无线)
                        </span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-12">
                <div class="col-sm-4 box-content">
                    <div class="box box-four box-duandian-warning">
                        <div class="img-box">
                            <img src="images/page1/u33.png">
                        </div>
                        <div class="box-text">
                            <span style="display: block">
                            <span class="baojingNum">0</span>辆
                        </span>
                        <span>
                            报警信息
                        </span>
                        </div>
                    </div>
                </div>
                <div class="col-sm-4 box-content ">
                    <div class="box box-five box-second-onrunline">
                        <div class="img-box">
                            <img src="images/page1/u41.png">
                        </div>
                        <div class="box-text">
                         <span style="display: block">
                            <span  class="deviceUnRun">0</span>辆
                         </span>
                        <span>
                            <span id="noneRun">2</span>天以上未行驶
                        </span>
                        </div>
                    </div>
                </div>
                <div class="col-sm-4 box-content box-zhengchang">
                    <div class="box box-seven">
                        <div class="img-box">
                            <img src="images/page1/u45.png">
                        </div>
                        <div class="box-text">
                            <span style="display: block">
                                <span class="zhengcahngCarNum">0</span>辆
                            </span>
                            <span>
                                正 常
                            </span>
                        </div>
                    </div>
                </div>
                <!--<div class="col-sm-4 box-content ">-->
                    <!--<div class="box box-six">-->
                        <!--<div class="img-box">-->
                            <!--<img src="images/page1/u37.png">-->
                        <!--</div>-->
                        <!--<div class="box-text">-->
                        <!--<span>-->
                            <!--电子围栏报警-->
                        <!--</span>-->
                        <!--</div>-->
                    <!--</div>-->
                <!--</div>-->
            </div>
        </div>
        <div class="row">
            <div class="col-sm-12">

                <!--<div class="col-sm-4 box-content ">-->
                    <!--<div class="box box-eight">-->
                        <!--<div class="img-box">-->
                            <!--<img src="images/page1/u53.png">-->
                        <!--</div>-->
                        <!--<div class="box-text">-->
                            <!--<span>-->
                                <!--报警处理-->
                            <!--</span>-->
                        <!--</div>-->
                    <!--</div>-->
                <!--</div>-->
                <div class="col-sm-4 box-content " id="moreDataFenxi">
                    <div class="box box-nine" >
                        <div class="img-box">
                            <img src="images/page1/u49.png">
                        </div>
                        <div class="box-text">
                            <span>
                                大数据分析
                            </span>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>
<div class="monitor-dialog" id="guanzhuDialog" style="display: none;border: 1px solid rgba(250, 104, 0, 1);;
    background-color:rgba(250, 104, 0, 1);;margin-left: -475px;">
    <div class="monitor-dialog-head">
                <span>
                        监控列表(总数<span class="totalNum">0</span>个，无线设备<span class="wxNum">0</span>个，有线设备<span class="yxNum">0</span>个)
                </span>
                <span class="button-box" id="exportZdjkCar">
                    导出
                </span>
        <button type="button" id="guanzhuClose" class="closebtn head-btn-close" data-dismiss="modal" aria-hidden="true"></button>
    </div>
    <div class="monitor-dialog-body" style="width: 960px">
        <div class="monitor-dialog-search" style="display: block;padding: 10px 3px">
            <form class="form-inline search-form">
                <div class="form-group" style="position: relative">
                    <label for="exampleInputName2">用户</label>
                    <input type="text" class="form-control" id="deptName" name="deptName" style="padding-right: 54px;width: 120px">
                    <button type="button" class="btn btn-theme zhudianSelectUser"
                            style="position: absolute;top: 0px;right: 0px;">选择</button>
                </div>
                <div class="form-group">
                    <label for="baseProtocolType">设备类别</label>
                    <select type="text" class="form-control" id="baseProtocolType" name="baseProtocolType">
                        <option value="0">请选择</option>
                        <option value="1">有线</option>
                        <option value="2">无线</option>
                    </select>
                </div>
                <div class="form-group">
                    <label for="carNo">车辆号码</label>
                    <input type="text" class="form-control" id="carNo" name="baseCarNo">
                </div>
                <div class="form-group">
                    <label for="userName">车主姓名</label>
                    <input type="text" class="form-control" id="userName" name="userName">
                </div>
                <!--<div class="form-group">
                    <label for="waringtype">报警类型</label>
                    <select type="text" class="form-control" id="waringtype" name="waringtype">
                        <option value="0">请选择</option>
                        <option value="1">驶入</option>
                        <option value="2">驶出</option>
                        <option value="3">超速</option>
                        <option value="4">路线偏离</option>
                        <option value="5">停车超时报警</option>
                        <option value="6">疲劳驾驶报警</option>
                        <option value="7">凌晨行车报警</option>
                    </select>
                </div>-->
               <!-- <div class="form-group">
                    <label for="exampleInputEmail2">监控类型</label>
                    <input type="text" class="form-control" id="exampleInputEmail2" >
                </div>-->
                <button type="button" id="searchBtn" class="btn btn-default" style="background-color: rgba(75, 94, 138, 1);color: #fff">查询</button>
            </form>
        </div>
        <div class="monitor-dialog-content">
            <table id="guanzhuInfoTable" class="table-responsive" ></table>
        </div>
    </div>
</div>
<div class="monitor-dialog outlineDialog" id="unonlineDialog" style="display: none;border: 1px solid rgba(153, 153, 153, 1);
    background-color:rgba(153, 153, 153, 1);;margin-left: -475px;">
    <div class="monitor-dialog-head">
                <span>
                        离线车辆（<span class="upCar">0</span>）
                </span>
        <span class="button-box" id="exportUnONlineCar">
                    导出
                </span>
        <button type="button" id="unOnlineClose" class="closebtn head-btn-close" data-dismiss="modal" aria-hidden="true"></button>
    </div>
    <div class="monitor-dialog-body" style="width: 960px">
        <div class="monitor-dialog-search" style="display: block;padding: 10px 3px">
            <form class="form-inline search-form search-form-box">
                <div class="form-group" style="position: relative;">
                    <label for="exampleInputName2">用户</label>
                    <input type="text" class="form-control" id="unLineDeptName" name="unLineDeptName" style="padding-right: 54px">
                    <button type="button" class="btn btn-theme unLineSelectUser"
                            style="position: absolute;top: 0px;right: 0px;">选择</button>
                </div>
                <!--<div class="form-group">-->
                    <!--<label for="baseProtocolType">设备类别</label>-->
                    <!--<select type="text" class="form-control" id="baseProtocolType" name="baseProtocolType">-->
                        <!--<option value="0">请选择</option>-->
                        <!--<option value="1">有线</option>-->
                        <!--<option value="2">无线</option>-->
                    <!--</select>-->
                <!--</div>-->
                <!--<div class="form-group">-->
                    <!--<label for="carNo">离线时长</label>-->
                    <!--<input type="email" class="form-control" id="carNo" name="carNo">-->
                    <!--<span>小时</span>-->
                <!--</div>-->
                <!--<div class="form-group">-->
                    <!--<label for="userName">开始时间</label>-->
                    <!--<input  class="laydate-icon form-control layer-date form-control" id="start">-->
                <!--</div>-->
                <!--<div class="form-group">-->
                    <!--<label for="exampleInputEmail2">结束时间</label>-->
                    <!--<input  class="laydate-icon form-control layer-date form-control" id="end">-->
                <!--</div>-->
                <button type="button" id="searchUnlineDataBtn" class="btn btn-default" style="background-color: rgba(75, 94, 138, 1);color: #fff">查询</button>
                <button type="button" id="unonlineButton"  class="btn btn-default" style="background-color: rgba(255, 0, 0, 1);color: #fff">重点监控</button>
            </form>
        </div>
        <div class="monitor-dialog-content">
            <table id="unOnlineCarInfoTable" style="max-height: 335px;overflow-y: auto"></table>
        </div>
    </div>
</div>
<div class="monitor-dialog outlineDialog" id="unonTimelineDialog" style="display: none;border: 1px solid rgba(153, 153, 153, 1);
    background-color:rgba(218, 112, 213, 1);;margin-left: -475px;">
    <div class="monitor-dialog-head">
                <span>
                        设备未按时上线（<span class="deviceUnLine">0</span>）
                </span>
        <span class="button-box" id="exportUnonTimeline">
                    导出
                </span>
        <button type="button" id="unOnTimelineClose" class="closebtn head-btn-close" data-dismiss="modal" aria-hidden="true"></button>
    </div>
    <div class="monitor-dialog-body" style="width: 960px">
        <div class="monitor-dialog-search" style="display: block;padding: 10px 3px">
            <form class="form-inline search-form search-form-box">
                <div class="form-group" style="position: relative">
                    <label for="deptName">用户</label>
                    <input type="text" class="form-control"
                           id="unonTimeDeptName"
                           name="unonTimeDeptName" style="padding-right: 54px">
                    <button type="button" class="btn btn-theme unonTimeSelectUser"
                            style="position: absolute;top: 0px;right: 0px;">选择</button>
                </div>
                <!--<div class="form-group">-->
                    <!--<label for="baseProtocolType">设备类别</label>-->
                    <!--<select type="text" class="form-control" id="baseProtocolType" name="baseProtocolType">-->
                        <!--<option value="0">请选择</option>-->
                        <!--<option value="1">有线</option>-->
                        <!--<option value="2">无线</option>-->
                    <!--</select>-->
                <!--</div>-->
                <!--<div class="form-group">-->
                <!--<label for="carNo">离线时长</label>-->
                <!--<input type="email" class="form-control" id="carNo" name="carNo">-->
                <!--<span>小时</span>-->
                <!--</div>-->
                <!--<div class="form-group">-->
                <!--<label for="userName">开始时间</label>-->
                <!--<input  class="laydate-icon form-control layer-date form-control" id="start">-->
                <!--</div>-->
                <!--<div class="form-group">-->
                <!--<label for="exampleInputEmail2">结束时间</label>-->
                <!--<input  class="laydate-icon form-control layer-date form-control" id="end">-->
                <!--</div>-->
                <button type="button" id="searchUnTimeDataBtn" class="btn btn-default" style="background-color: rgba(75, 94, 138, 1);color: #fff">查询</button>
                <button type="button" id="unonTimelinebtn"  class="btn btn-default" style="background-color: rgba(255, 0, 0, 1);color: #fff">重点监控</button>
            </form>
        </div>
        <div class="monitor-dialog-content">
            <table id="unOnTimelineCarInfoTable" style="max-height: 335px;overflow-y: auto"></table>
        </div>
    </div>
</div>
<div class="monitor-dialog outlineDialog" id="norunlineDialog" style="display: none;border: 1px solid rgba(153, 153, 153, 1);
    background-color:rgba(240, 163, 10, 1);;margin-left: -475px;">
    <div class="monitor-dialog-head">
                <span>
                        未行使车辆（<span class="deviceUnRun">0</span>）
                </span>
        <span class="button-box" id="exportNorunlineCar">
            导出
        </span>
        <button type="button" id="unRunlineClose" class="closebtn head-btn-close" data-dismiss="modal" aria-hidden="true"></button>
    </div>
    <div class="monitor-dialog-body" style="width: 960px">
        <div class="monitor-dialog-search" style="display: block;padding: 10px 3px">
            <form class="form-inline search-form search-form-box">
                <div class="form-group" style="position: relative">
                    <label for="norunlineDeptName">用户</label>
                    <input type="text" class="form-control"
                           id="norunlineDeptName" name="norunlineDeptName" style="padding-right: 54px">
                    <button type="button" class="btn btn-theme norunlineSelectUser"
                            style="position: absolute;top: 0px;right: 0px;">选择</button>
                </div>
                <!--<div class="form-group">-->
                    <!--<label for="baseProtocolType">设备类别</label>-->
                    <!--<select type="text" class="form-control" id="baseProtocolType" name="baseProtocolType">-->
                        <!--<option value="0">请选择</option>-->
                        <!--<option value="1">有线</option>-->
                        <!--<option value="2">无线</option>-->
                    <!--</select>-->
                <!--</div>-->
                <!--<div class="form-group">-->
                <!--<label for="carNo">离线时长</label>-->
                <!--<input type="email" class="form-control" id="carNo" name="carNo">-->
                <!--<span>小时</span>-->
                <!--</div>-->
                <!--<div class="form-group">-->
                <!--<label for="userName">开始时间</label>-->
                <!--<input  class="laydate-icon form-control layer-date form-control" id="start">-->
                <!--</div>-->
                <!--<div class="form-group">-->
                <!--<label for="exampleInputEmail2">结束时间</label>-->
                <!--<input  class="laydate-icon form-control layer-date form-control" id="end">-->
                <!--</div>-->
                <button type="button" id="searchNoRunDataBtn" class="btn btn-default" style="background-color: rgba(75, 94, 138, 1);color: #fff">查询</button>
                <button type="button" id="norunlinebtn"  class="btn btn-default" style="background-color: rgba(255, 0, 0, 1);color: #fff">重点监控</button>
            </form>
        </div>
        <div class="monitor-dialog-content">
            <table id="norunlineInfoTable" style="max-height: 335px;overflow-y: auto"></table>
        </div>
    </div>
</div>

<!--<div class="monitor-dialog outlineDialog" id="warningReportDialog" style="display: none;border: 1px solid rgba(153, 153, 153, 1);
    background-color:rgba(153, 153, 153, 1);;margin-left: -475px;">
    <div class="monitor-dialog-head">
                <span>
                        设备未按时上线（<span class="upCar">0</span>）
                </span>
        <span class="button-box" id="exportUnONlineCar">
                    导出
                </span>
        <button type="button" id="unOnlineClose" class="closebtn head-btn-close" data-dismiss="modal" aria-hidden="true"></button>
    </div>
    <div class="monitor-dialog-body" style="width: 960px">
        <div class="monitor-dialog-search" style="display: block;padding: 10px 3px">
            <form class="form-inline search-form search-form-box">
                <div class="form-group">
                    <label for="exampleInputName2">用户</label>
                    <input type="text" class="form-control" id="exampleInputName2" >
                </div>
                <div class="form-group">
                    <label for="baseProtocolType">设备类别</label>
                    <select type="text" class="form-control" id="baseProtocolType" name="baseProtocolType">
                        <option value="0">请选择</option>
                        <option value="1">有线</option>
                        <option value="2">无线</option>
                    </select>
                </div>
                &lt;!&ndash;<div class="form-group">&ndash;&gt;
                    &lt;!&ndash;<label for="carNo">离线时长</label>&ndash;&gt;
                    &lt;!&ndash;<input type="email" class="form-control" id="carNo" name="carNo">&ndash;&gt;
                    &lt;!&ndash;<span>小时</span>&ndash;&gt;
                &lt;!&ndash;</div>&ndash;&gt;
                &lt;!&ndash;<div class="form-group">&ndash;&gt;
                    &lt;!&ndash;<label for="userName">开始时间</label>&ndash;&gt;
                    &lt;!&ndash;<input  class="laydate-icon form-control layer-date form-control" id="start">&ndash;&gt;
                &lt;!&ndash;</div>&ndash;&gt;
                &lt;!&ndash;<div class="form-group">&ndash;&gt;
                    &lt;!&ndash;<label for="end">结束时间</label>&ndash;&gt;
                    &lt;!&ndash;<input  class="laydate-icon form-control layer-date form-control" id="end">&ndash;&gt;
                &lt;!&ndash;</div>&ndash;&gt;
                <button type="button" id="searchNoTimeBtn" class="btn btn-default" style="background-color: rgba(75, 94, 138, 1);color: #fff">查询</button>
            </form>
        </div>
        <div class="monitor-dialog-content">
            <table class="table-responsive" id="warningInfoTable"></table>
        </div>
    </div>
</div>-->
<div class="monitor-dialog outlineDialog" id="duandianReportDialog" style="display: none;border: 1px solid rgba(153, 153, 153, 1);
    background-color:rgba(218, 112, 213, 1);margin-left: -475px;">
    <div class="monitor-dialog-head">
                <span>
                    报警信息（<span class="baojingNum"></span>）
                </span>
        <span class="button-box" id="exportDuandianReport">
                    导出
                </span>
        <button type="button" id="duandianclose" class="closebtn head-btn-close" data-dismiss="modal" aria-hidden="true"></button>
    </div>
    <div class="monitor-dialog-body" style="width: 960px">
        <div class="monitor-dialog-search" style="display: block;padding: 10px 3px">
            <form class="form-inline search-form search-form-box">
                <input type="hidden" id="warningDeptId">
                <!--<div class="form-group" hidden="hidden">-->
                    <!--<label for="exampleInputName2">设备序列号：</label>-->
                    <!--<input type="text" class="form-control" id="exampleInputName2" >-->
                <!--</div>-->
                <div class="form-group">
                    <label for="exampleInputName2">车牌号：</label>
                    <input type="text" class="form-control" id="baseCarNo" >
                </div>
                <div class="form-group" style="position: relative">
                    <label for="deptName">用户：</label>
                    <input type="text" class="form-control" id="warningDeptName" name="deptName" style="padding-right: 54px">
                    <button type="button" class="btn btn-theme selectUser"
                            style="position: absolute;top: 0px;right: 0px;">选择</button>
                </div>
                <div class="form-group">
                    <label for="baseProtocolType">报警类型</label>
                    <select type="text" class="form-control" id="waringtype" name="waringtype">
                        <option value="">请选择</option>
                        <option value="1">驶入</option>
                        <option value="2">驶出</option>
                        <option value="3">超速</option>
                        <option value="4">路线偏离</option>
                        <option value="5">停车超时报警</option>
                        <option value="6">疲劳驾驶报警</option>
                        <option value="7">凌晨行车报警</option>
                        <option value="8">断电报警</option>
                    </select>
                </div>
                <div class="form-group">
                    <label for="carNo">处理状态：</label>
                    <select type="text" class="form-control" id="waringstate" name="waringstate">
                        <option value="0">未处理</option>
                        <option value="1">已处理</option>
                    </select>
                </div>
                <div class="form-group">
                    <label for="userName">开始时间</label>
                    <input id="start"  class="laydate-icon form-control layer-date"
                           type="text">
                </div>
                <div class="form-group">
                    <label for="end">结束时间</label>
                    <input id="end"  class="laydate-icon form-control layer-date"
                           type="text">
                </div>
                <button type="button" id="searchBaoJingBtn" class="btn btn-default" style="background-color: rgba(75, 94, 138, 1);color: #fff">查询</button>
                <button type="button" id="resetSearchBaoJingBtn"  class="btn btn-default" style="background-color: rgba(255, 0, 0, 1);color: #fff">重置</button>
            </form>
        </div>
        <div class="monitor-dialog-content">
            <table class="table-responsive" id="duandianTable"></table>
        </div>
    </div>
</div>
<div class="monitor-dialog outlineDialog" id="zhengchangDialog" style="display: none;border: 1px solid rgba(153, 153, 153, 1);
    background-color:rgba(0, 192, 117, 1);margin-left: -475px;">
    <div class="monitor-dialog-head">
                <span>
                        正常（<span class="zhengcahngCarNum">0</span>）
                </span>
        <!--<span class="button-box" id="exportUnONlineCar">-->
        <!--导出-->
        <!--</span>-->
        <button type="button" id="zhengchangclose" class="closebtn head-btn-close" data-dismiss="modal" aria-hidden="true"></button>
    </div>
    <div class="monitor-dialog-body" style="width: 960px">
        <!--<div class="monitor-dialog-search" style="display: block;padding: 10px 3px">-->
            <!--<form class="form-inline search-form search-form-box">-->
                <!--<div class="form-group">-->
                    <!--<label for="exampleInputName2">设备序列号：</label>-->
                    <!--<input type="text" class="form-control" id="exampleInputName2" >-->
                <!--</div>-->
                <!--<div class="form-group">-->
                    <!--<label for="exampleInputName2">设备号码：</label>-->
                    <!--<input type="text" class="form-control" id="exampleInputName2" >-->
                <!--</div>-->
                <!--<div class="form-group">-->
                    <!--<label for="exampleInputName2">分组：</label>-->
                    <!--<input type="text" class="form-control" id="exampleInputName2" >-->
                <!--</div>-->
                <!--<div class="form-group">-->
                    <!--<label for="baseProtocolType">报警类型</label>-->
                    <!--<select type="email" class="form-control" id="waringtype" name="waringtype">-->
                        <!--<option value="0">请选择</option>-->
                        <!--<option value="1">驶入</option>-->
                        <!--<option value="2">驶出</option>-->
                        <!--<option value="3">超速</option>-->
                        <!--<option value="4">路线偏离</option>-->
                        <!--<option value="5">停车超时报警</option>-->
                        <!--<option value="6">疲劳驾驶报警</option>-->
                        <!--<option value="7">凌晨行车报警</option>-->
                    <!--</select>-->
                <!--</div>-->
                <!--<div class="form-group">-->
                    <!--<label for="carNo">处理状态：</label>-->
                    <!--<select type="email" class="form-control" id="waringstate" name="waringstate">-->
                        <!--<option value="0">未处理</option>-->
                        <!--<option value="1">已处理</option>-->
                    <!--</select>-->
                <!--</div>-->
                <!--<div class="form-group">-->
                    <!--<label for="userName">开始时间</label>-->
                    <!--<input  class="laydate-icon form-control layer-date form-control" id="start">-->
                <!--</div>-->
                <!--<div class="form-group">-->
                    <!--<label for="exampleInputEmail2">结束时间</label>-->
                    <!--<input  class="laydate-icon form-control layer-date form-control" id="end">-->
                <!--</div>-->
                <!--<button type="button" id="searchBtn" class="btn btn-default" style="background-color: rgba(75, 94, 138, 1);color: #fff">查询</button>-->
            <!--</form>-->
        <!--</div>-->
        <div class="monitor-dialog-content">
            <!--<table class="table-responsive" id="duandianTable"></table>-->
            <table class="table-responsive" id="zhengchangInfoTable" ></table>
        </div>
    </div>
</div>
<div class="monitor-dialog monitor-dialog-form" id="carDetailsDialog" style="display: none;z-index:10009">
    <div class="monitor-dialog-head">
                <span>
                    信息详情
                </span>
        <!--<span class="closebtn">-->
        <!--<img src="images/page3/close_img.png">-->
        <!--</span>-->
        <button type="button" id="carDetailsDialogClose" class="closebtn head-btn-close" data-dismiss="modal" aria-hidden="true"></button>
    </div>
    <div class="monitor-dialog-body" id="carDetailsInfo">
        <input id="id" name="id" type="hidden">
        <input id="baseTerminalId" name="baseTerminalId" type="hidden">
        <input id="baseCarTypeId" name="baseCarTypeId" type="hidden">
        <input id="deptId" name="deptId" type="hidden">
        <div class="monitor-dialog-content">
            <div class="msghead" style="background-color:#F1F5FB;padding:4px;">
                    <span style="color:#344175;font-size: 14px">
                        设备信息
                    </span>
            </div>
            <div class="msgbody" style="background-color: #FFF;padding: 6px 12px;font-size: 14px;height: 130px">
                <div class="row" style="margin-right: 0;margin-left: 0;margin-bottom:6px; margin-top: 6px;">
                    <div class="col-sm-12" style="padding-left: 0;padding-right: 0">
                        <div class="col-sm-3" style="padding-left: 0;padding-right: 0">
                            <label style="display: inline-block">所属用户:</label>
                            <span name="deptName"></span>
                        </div>
                        <div class="col-sm-3" style="padding-left: 0;padding-right: 0">
                            <label style="display: inline-block">设备编号:</label>
                            <span  name="baseTerminalId"></span>
                        </div>
                        <div class="col-sm-3" style="padding-left: 0;padding-right: 0">
                            <label style="display: inline-block">SIM卡号:</label>
                            <span name="baseTerminalSim"></span>
                        </div>
                        <div class="col-sm-3" style="padding-left: 0;padding-right: 0">
                            <label style="display: inline-block">设备协议:</label>
                            <span name="baseTerminalProtocol"></span>
                        </div>
                    </div>
                </div>
                <div class="row" style="margin-right: 0;margin-left: 0;margin-bottom:6px; margin-top: 6px;">
                    <div class="col-sm-12" style="padding-left: 0;padding-right: 0">
                        <div class="col-sm-3" style="padding-left: 0;padding-right: 0">
                            <label style="display: inline-block">设备型号:</label>
                            <span name="baseProtocolType"></span>
                        </div>
                        <!--<div class="col-sm-3" style="padding-left: 0;padding-right: 0">-->
                        <!--<label style="display: inline-block">设备类别:</label>-->
                        <!--<span></span>-->
                        <!--</div>-->
                        <div class="col-sm-3" style="padding-left: 0;padding-right: 0">
                            <label style="display: inline-block">入网时间:</label>
                            <span name="baseTerminalExeTime"></span>
                        </div>

                        <!--<div class="col-sm-3" style="padding-left: 0;padding-right: 0">
                            <label style="display: inline-block">到期时间:</label>
                            <span></span>
                        </div>-->
                        <div class="col-sm-3" style="padding-left: 0;padding-right: 0">
                            <label style="display: inline-block">服务年限:</label>
                            <span name="baseTerminalSetupLimited"></span>
                        </div>
                    </div>
                </div>
                <!--<div class="row" style="margin-right: 0;margin-left: 0;margin-bottom:6px; margin-top: 6px;">
                    <div class="col-sm-12" style="padding-left: 0;padding-right: 0">
                        <div class="col-sm-3" style="padding-left: 0;padding-right: 0">
                            <label style="display: inline-block">服务年限:</label>
                            <span name="baseTerminalSetupLimited"></span>
                        </div>
                    </div>
                </div>-->
            </div>
        </div>
        <div class="monitor-dialog-content" style="margin-top: 8px">
            <div class="msghead" style="background-color:#F1F5FB;padding:4px;">
                    <span style="color:#344175;font-size: 14px">
                        车辆信息
                    </span>
            </div>
            <div class="msgbody" style="background-color: #FFF;padding: 6px 12px;font-size: 14px;height: 130px">
                <div class="row" style="margin-right: 0;margin-left: 0;margin-bottom:6px; margin-top: 6px;">
                    <div class="col-sm-12" style="padding-left: 0;padding-right: 0">
                        <div class="col-sm-3" style="padding-left: 0;padding-right: 0">
                            <label style="display: inline-block">车牌号码:</label>
                            <span name="baseCarNo"></span>
                        </div>
                        <div class="col-sm-3" style="padding-left: 0;padding-right: 0">
                            <label style="display: inline-block">车辆品牌:</label>
                            <span name="baseCarBrand"></span>
                        </div>
                        <div class="col-sm-3" style="padding-left: 0;padding-right: 0">
                            <label style="display: inline-block">车辆类型:</label>
                            <span name="baseCarTypeId"></span>
                        </div>
                        <div class="col-sm-3" style="padding-left: 0;padding-right: 0">
                            <label style="display: inline-block">车辆颜色:</label>
                            <span name="baseBarColor"></span>
                        </div>
                    </div>
                </div>
                <div class="row" style="margin-right: 0;margin-left: 0;margin-bottom:6px; margin-top: 6px;">
                    <div class="col-sm-12" style="padding-left: 0;padding-right: 0">
                        <div class="col-sm-3" style="padding-left: 0;padding-right: 0">
                            <label style="display: inline-block">车架号:</label>
                            <span name="baseCarJjNo"></span>
                        </div>
                        <div class="col-sm-3" style="padding-left: 0;padding-right: 0">
                            <label style="display: inline-block">车主姓名:</label>
                            <span name="userName"></span>
                        </div>
                        <div class="col-sm-3" style="padding-left: 0;padding-right: 0">
                            <label style="display: inline-block">车主电话:</label>
                            <span name="userPhone"></span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="monitor-dialog" id="moreDataDialog" style="display: none;border: 1px solid rgba(153, 153, 153, 1);
    background-color:rgba(52, 101, 218, 1);margin-left: -475px;">
    <div class="monitor-dialog-head">
                <span>
                        大数据分析
                </span>
        <button type="button" id="moreDataClose" class="closebtn head-btn-close" data-dismiss="modal" aria-hidden="true"></button>
    </div>
    <div class="monitor-dialog-body" style="width: 960px">
        <!--<div class="monitor-dialog-search" style="display: block;padding: 10px 3px">-->
            <!--<form class="form-inline search-form search-form-box">-->
                <!--<div class="form-group">-->
                    <!--<label for="exampleInputName2">分组</label>-->
                    <!--<input type="text" class="form-control" id="exampleInputName2" >-->
                <!--</div>-->
                <!--<div class="form-group">-->
                    <!--<label for="baseProtocolType">设备类别</label>-->
                    <!--<select type="email" class="form-control" id="baseProtocolType" name="baseProtocolType">-->
                        <!--<option value="0">请选择</option>-->
                        <!--<option value="1">有线</option>-->
                        <!--<option value="2">无线</option>-->
                    <!--</select>-->
                <!--</div>-->
                <!--&lt;!&ndash;<div class="form-group">&ndash;&gt;-->
                <!--&lt;!&ndash;<label for="carNo">离线时长</label>&ndash;&gt;-->
                <!--&lt;!&ndash;<input type="email" class="form-control" id="carNo" name="carNo">&ndash;&gt;-->
                <!--&lt;!&ndash;<span>小时</span>&ndash;&gt;-->
                <!--&lt;!&ndash;</div>&ndash;&gt;-->
                <!--&lt;!&ndash;<div class="form-group">&ndash;&gt;-->
                <!--&lt;!&ndash;<label for="userName">开始时间</label>&ndash;&gt;-->
                <!--&lt;!&ndash;<input  class="laydate-icon form-control layer-date form-control" id="start">&ndash;&gt;-->
                <!--&lt;!&ndash;</div>&ndash;&gt;-->
                <!--&lt;!&ndash;<div class="form-group">&ndash;&gt;-->
                <!--&lt;!&ndash;<label for="exampleInputEmail2">结束时间</label>&ndash;&gt;-->
                <!--&lt;!&ndash;<input  class="laydate-icon form-control layer-date form-control" id="end">&ndash;&gt;-->
                <!--&lt;!&ndash;</div>&ndash;&gt;-->
                <!--<button type="button" id="searchUnlineDataBtn" class="btn btn-default" style="background-color: rgba(75, 94, 138, 1);color: #fff">查询</button>-->
                <!--<button type="button" id="unonlineButton"  class="btn btn-default" style="background-color: rgba(255, 0, 0, 1);color: #fff">重点监控</button>-->
            <!--</form>-->
        <!--</div>-->
        <!--<div class="monitor-dialog-content">-->
            <!--<table id="unOnlineCarInfoTable" style="height: 335px;max-height: 335px;overflow-y: auto"></table>-->
        <!--</div>-->
        <div class="flot-chart" style="min-width:400px;height:350px">
            <div class="flot-chart-content" id="container"></div>
        </div>
    </div>
</div>
<div class="modal fade" id="myTreeDialog">
    <div class="modal-dialog" style="width: 320px;">
        <div class="modal-content" style="width: 320px;">
            <div class="modal-header">
                <button type="button" class="close" onclick="closeTreeDialog()">×</button>
                <h4 class="modal-title" id="NoPermissionModalLabel">所属用户</h4>
            </div>
            <div class="modal-body" style="height:320px;max-height:320px;max-width: 320px;
                overflow: auto;">
                <ul id="userCommonTree" class="ztree">
                </ul>
            </div>
            <div class="modal-footer">
                <button class="btn btn-info"   type="button" onclick="getAllCheckNodes()">确 定</button>
            </div>
        </div>
    </div>
</div>
<%-include ../taglibs/layout.js.ejs%>
<script src="http://cdn.hcharts.cn/highcharts/highcharts.js"></script>
<script src="http://cdn.hcharts.cn/highcharts/modules/exporting.js"></script>
<script src="http://cdn.hcharts.cn/highcharts/themes/gray.js"></script>
<script type="text/javascript" src="http://cdn.hcharts.cn/highcharts-plugins/highcharts-zh_CN.js"></script>
<!--时间-->
<script src="js/plugins/layer/laydate/laydate.js"></script>
<script src="js/plugins/zTree/js/jquery.ztree.all-3.5.js"></script>
<script src="js/plugins/zTree/js/jquery.ztree.exhide-3.5.js"></script>
<!--<script src="/js/ztree/ztree-cus-table.js"></script>-->
<script src="js/ztree/ztree-cus-check.js"></script>
<script src="js/ztree/ztree-user.js"></script>
<script type="text/javascript">
    var islxCacheData=false,
        _duandian_data=false,
        _deviceUnrun_data=false,
        _zhengcahngCarNum = false;
    if(window.localStorage.getItem("unlineData")){
        $("#unlineData").text(window.localStorage.getItem("unlineData"));
    }
    if(window.localStorage.getItem("noneRunData")){
        $("#noneRun").text(window.localStorage.getItem("noneRunData"))
    }
    if(window.localStorage.getItem("unlineDeviceData")){
        $("#unlineDeviceData").text(window.localStorage.getItem("unlineDeviceData"))
    }
    var __count = window.localStorage.getItem("zdjkCacheData");
    if(__count){
        $(".watchCarTotalNum").text(__count)
    }
    var _lxCount = window.localStorage.getItem("lxCacheData");
    if(_lxCount){
        $(".upCar").text(_lxCount)
    }
    var device_len = window.localStorage.getItem("deviceCacheData");
    if(device_len){
        $(".deviceUnLine").text(device_len)
    }
    var duandian_len = window.localStorage.getItem("duandianCacheData");
    if(duandian_len){
        $(".baojingNum").text(duandian_len)
    }
    var deviceUnrun_len = window.localStorage.getItem("norunlineCacheData");
    if(deviceUnrun_len){
        $(".deviceUnRun").text(deviceUnrun_len)
    }
    var zhengchang_num = window.localStorage.getItem("zhengchangCacheData");
    if(zhengchang_num){
        $(".zhengcahngCarNum").text(zhengchang_num);
    }
</script>
<script type="text/javascript" src="js/viewpage/home-copy.js"></script>
<script type="text/javascript">
    var url = '/tree/dept';
    var openKey = ""
    $(function () {
        var start = {
            elem: '#start',
            format: 'YYYY-MM-DD hh:mm:ss',
//            min: laydate.now(), //设定最小日期为当前日期
            max: '2999-06-16 23:59:59', //最大日期
//            start: laydate.now(),
//            start: laydate.now() + ' 00:00:00',
            istime: true,
            istoday: false,
            festival: true, //是否显示节日
            choose: function (datas) {
                if(datas){
                    end.min =datas.substring(0,10)+" 00:00:00"
                    end.start = datas.substring(0,10)+" 00:00:00"
                }
//                end.min = datas; //开始日选好后，重置结束日的最小日期
//                end.start = datas //将结束日的初始值设定为开始日
            }
//            min: laydate.now(-1), //-1代表昨天，-2代表前天，以此类推
//            max: laydate.now(+1) //+1代表明天，+2代表后天，以此类推
        };
        var end = {
            elem: '#end',
            format: 'YYYY-MM-DD hh:mm:ss',
//            min: laydate.now(),
            max: '2999-06-16 23:59:59',
//            start: laydate.now() + ' 23:59:59',
            istime: true,
            istoday: false,
            festival: true, //是否显示节日
            choose: function (datas) {
                var st=$("#start").val();
                if(st>datas){
                    swal({
                        title: "系统提示",
                        text: "开始时间必须小于结束时间!",
                        type: "error"
                    });
//                    $("#end").val(laydate.now() + ' 23:59:59');
                }else{
                    start.max = datas.substring(0,10)+" 23:59:59"; //结束日选好后，重置开始日的最大日期
                }
            }
        };
        laydate(start);
        laydate(end);
        $("#start").val(laydate.now() + ' 00:00:00');
        $("#end").val(laydate.now() + ' 23:59:59');
        UserTreeComponents.initUserTree('id', 'parentId', 'name',clickTree,treeCheck, "radio");
        UserTreeComponents.loadUserTree(url,"userCommonTree",true)
        $(".selectUser").on("click",function () {
            openKey = "selectUser"
            $("#myTreeDialog").modal("show");
        });
        $(".unLineSelectUser").on("click",function () {
            openKey = "unLineSelectUser"
            $("#myTreeDialog").modal("show");
        });
        $(".unonTimeSelectUser").on("click",function () {
            openKey = "unonTimeSelectUser"
            $("#myTreeDialog").modal("show");
        });
        $(".norunlineSelectUser").on("click",function () {
            openKey = "norunlineSelectUser"
            $("#myTreeDialog").modal("show");
        });
        $(".zhudianSelectUser").on("click",function () {
            openKey = "zhudianSelectUser"
            $("#myTreeDialog").modal("show");
        });



    });
    //    图表
    $(function () {
        var pieData=[
            ['3天以上离线',   45.0],
            ['报警',       26.8],
            {
                name: '2天以上未行使',
                y: 12.8,
                sliced: true,
                selected: true
            },
//            ['电子围栏报警',    8.5],
            ['正常',     6.2]
        ]
        //drawChartPieBase(pieData);
        queryChart();
    });
    function queryChart() {
        //var pieData = JSON.parse(_pieJsonData);
        var _unlineData = window.localStorage.getItem("lxCacheData") ? window.localStorage.getItem("lxCacheData") : 0;
        var _duandianCacheData = window.localStorage.getItem("duandianCacheData")
            ? window.localStorage.getItem("duandianCacheData") : 0;
        var _noneRunData = window.localStorage.getItem("norunlineCacheData") ? window.localStorage.getItem("norunlineCacheData"):0
        var _zhengchangCacheData = window.localStorage.getItem("zhengchangCacheData") ? window.localStorage.getItem("zhengchangCacheData") : 0;

        var _pieData = [
            {
                y:parseInt(_unlineData),
                color:'rgba(153, 153, 153, 1)'
            },
            {
                y:parseInt(_duandianCacheData),
                color:'rgba(218, 112, 213, 1)'
            },
            {
                y: parseInt(_noneRunData),
                color:'rgba(240, 163, 10, 1)'
            },
            {
                y:parseInt(_zhengchangCacheData),
                color:'rgba(0, 192, 117, 1)'
            }
        ]
        drawChartPieBase(_pieData);
//        var carId = $("#h_c_car_id").val();
//        var start=$("#start").val();
//        var end=$("#end").val();
//        var _pieJsonData = window.localStorage.getItem("pieJsonData");
//        if(_pieJsonData){
//            var pieData = JSON.parse(_pieJsonData);
//            var _pieData = [
//                {
//                    y:pieData.outlineInfo,
//                    color:'rgba(153, 153, 153, 1)'
//                },
//                {
//                    y: parseInt(pieData.noElecInfo) + parseInt(pieData.waringInfo),
//                    color:'rgba(218, 112, 213, 1)'
//                },
//                {
//                    y: pieData.noSpeedInfo,
//                    color:'rgba(240, 163, 10, 1)'
//                },
//                {
//                    y: pieData.waringInfo,
//                    color:'rgba(52, 101, 218, 1)'
//                },
//                {
//                    y: pieData.goodCount,
//                    color:'rgba(0, 192, 117, 1)'
//                }
//            ]
//            drawChartPieBase(_pieData);
//        }
//        $.ajax({
//            type: "POST",
//            url: "/reportManage/queryTotalBigChart?sblxday="+$("#unlineData").text()+"&wxsday="+$("#noneRun").text(),
//            cache: false,
//            async: true,
//            dataType: "json",
//            success: function (data) {
//                var pieData=data.data;
//                var pieJsonData = window.localStorage.getItem("pieJsonData");
//                //if(!pieJsonData || pieJsonData==JSON.stringify(pieData)){
//                    var _pieData = [
//                        {
//                            y:pieData.outlineInfo,
//                            color:'rgba(153, 153, 153, 1)'
//                        },
//                        {
//                            y: parseInt(pieData.noElecInfo) + parseInt(pieData.waringInfo),
//                            color:'rgba(218, 112, 213, 1)'
//                        },
//                        {
//                            y: pieData.noSpeedInfo,
//                            color:'rgba(240, 163, 10, 1)'
//                        },
//                        {
//                            y: pieData.waringInfo,
//                            color:'rgba(52, 101, 218, 1)'
//                        },
//                        {
//                            y: pieData.goodCount,
//                            color:'rgba(0, 192, 117, 1)'
//                        }
//                    ]
//                    drawChartPieBase(_pieData);
//                    window.localStorage.setItem("pieJsonData",JSON.stringify(pieData))
//               // }
//
//            }
//        });
    }
    function drawChartPieBase(pieData) {
        var unlineDayNum = window.localStorage.getItem("unlineData") ? window.localStorage.getItem("unlineData") : 3;
        var unlineDayText = unlineDayNum+"天以上离线";
        var noRunDayNum = window.localStorage.getItem("noneRunData") ? window.localStorage.getItem("noneRunData") : 2;
        var noRunDayText = noRunDayNum+"天以上未行使";
        $('#container').highcharts({
            chart: {
                type: 'column',
                backgroundColor:'#FFFFFF'
            },
            title: {
                text: '大数据分析'
            },
            xAxis: {
                categories: [
                    unlineDayText,
                    '报警',
                    noRunDayText,
                    '正常'
                ],
                crosshair: true
            },
            yAxis: {
                min: 0,
                title: {
                    text: '数量'
                }
            },
            tooltip: {
                headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
                pointFormat: '<tr><td style="color:{series.color};padding:0"></td>' +
                '<td style="padding:0"><b>{point.y}辆</b></td></tr>',
                footerFormat: '</table>',
                shared: true,
                useHTML: true
            },
            plotOptions: {
                column: {
                    pointPadding: 0.2,
                    borderWidth: 0
                }
            },
            series: [{
                name:"车辆",
                data:pieData
            }]
        });
    }
    <!--function outexcel() {-->
        <!--var carId = $("#h_c_car_id").val();-->
        <!--var start=$("#start").val();-->
        <!--var end=$("#end").val();-->
        <!--var jsonstr = [{"carId": carId},{"start": start},{"end": end}];-->
        <!--window.open("/report/exportFenceExcel?carId="+carId+"&start="+start+"&end="+end)-->
    <!--}-->
    var timeInterval = null;
    var isInterval = false;
    timeInterval = setInterval(function () {
        if(isInterval){
            clearInterval(timeInterval);
        }
        if(islxCacheData && _duandian_data && _deviceUnrun_data && _zhengcahngCarNum){
            isInterval=true;
            queryChart()
        }
    },2000)
    function getAllCheckNodes() {
        var node = userTreeObj.getCheckedNodes(true)[0];
        if(node){
            if(openKey == "selectUser"){
                $("#warningDeptName").val(node.name);
                $("#warningDeptId").val(node.id);
            }else if(openKey == "unLineSelectUser"){
                $("#unLineDeptName").val(node.name);
                //$("#warningDeptId").val(node.id);
            }else if(openKey == "unonTimeSelectUser"){
                $("#unonTimeDeptName").val(node.name);
            }else if(openKey == "norunlineSelectUser"){
                $("#norunlineDeptName").val(node.name);
            }else if(openKey == "zhudianSelectUser"){
                $("#deptName").val(node.name);
            }

        }else{
            if(openKey == "selectUser"){
                $("#warningDeptName").val("");
                $("#warningDeptId").val("");
            }else if(openKey == "unLineSelectUser"){
                $("#unLineDeptName").val("");
                //$("#warningDeptId").val(node.id);
            }else if(openKey == "unonTimeSelectUser"){
                $("#unonTimeDeptName").val("");
            }else if(openKey == "norunlineSelectUser"){
                $("#norunlineDeptName").val("");
            }else if(openKey == "zhudianSelectUser"){
                $("#deptName").val("");
            }
        }
        closeTreeDialog();
    }
    function closeTreeDialog() {
        $("#myTreeDialog").modal("hide");
    }
    function clickTree(event, treeId, treeNode) {
//        debugger;
//        var flag=treeNode.checked;
//        tree_Obj.checkNode(treeNode, true, true);
//        selectTreeNode(treeNode);
    }
    function treeCheck(event, treeId, treeNode, clickFlag) {

    }
</script>
</body>
</html>